Route the save-file manager through the UI (closes #42)#89
Merged
Conversation
The pre-game save-slot manager was the last place using bare input()/print(), which only worked in the console. It now renders and reads through the active front-end: - The UI is built early in __init__ (with default new-game state) so the manager can use it; the chosen save is loaded over the defaults afterward and the UI is pointed at the loaded state. - _selectSaveFile / _deleteSaveFile present slots and actions as numbered showOptions choices, and use showDialogue for confirmations — so they work in pygame (and any future front-end), not just the console. No bare input() remains anywhere in the game; every input goes through the UI. Closes #42 Closes #88 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dmccoystephenson
left a comment
Member
Author
There was a problem hiding this comment.
Self-review:
- Scope: PASS — fishE init reorder + save-menu rewrite + tests.
- Issue: PASS — no bare input() remains anywhere; save menu now renders/reads via showOptions/showDialogue, so pygame needs no console. Closes #42/#88.
- Behavior: PASS — console still works (slots/actions as numbered options); load-if-exists logic preserved (defaults created once instead of else-branches).
- Tests: PASS — 190; new menu tests (new/load/delete-confirmed/cancelled); test_initialization validates the construction reorder.
- Persistence safety: load/save methods, saveFileManager, schemas, and reader/writers untouched.
- CI: PASS.
1 task
dmccoystephenson
added a commit
that referenced
this pull request
Jun 13, 2026
The README said the save-file manager shows each save's "Last Modified" time, but since the manager was routed through the UI (#89) each slot is presented as a compact menu option labelled "Load Slot N (Day X, $Y, Z fish)" — it no longer displays a last-modified timestamp. A reader comparing the docs to the actual screen would be misled. Updates the Multiple Save Files section to match what the manager actually shows (Day, Money, Fish count) and reflects that slots are chosen as menu options. The rest of the docs were swept against source as part of this pass: README features, the branching/Contributing section, and all four schemas (verified in sync with their reader/writers) are accurate. Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
This is the last piece of #42 (tracked as #88). The pre-game save-slot manager used bare
input()/print(), so a pygame player still had to use the console to pick or delete a save.What changed
FishE.__init__now builds the UI early (with default new-game state) before the save-file manager runs, then loads the chosen slot over those defaults and points the UI at the loaded state. (This also simplified the load block — defaults are created once instead of viaelsebranches.)_selectSaveFile/_deleteSaveFilepresent save slots and actions (Load / Create New / Delete / Quit; and the delete confirmation) as numberedshowOptionschoices, and useshowDialoguefor messages — so the whole flow renders and reads input through the active front-end.grepconfirms no bareinput()remains anywhere in the game; every input goes through the UI. Together with #87 (in-play input), #42 is fully resolved.Test plan
python3 -m compileall -q srccleanSDL_VIDEODRIVER=dummy SDL_AUDIODRIVER=dummy python3 -m pytest— 190 passedtest_fishEcases for the now-testable menu: new-game selects the next slot, loading selects the chosen slot, delete confirmed vs cancelled. Existingtest_initializationstill passes with the construction reorder.Closes #42
Closes #88
🤖 Generated with Claude Code